{% extends 'base.html' %}
{% block left %}
    {% include "menu.html" %}
{% endblock %}
{% load zui %}
{% block nav_bar %}
    <li>房源管理</li>
    <li>租房列表</li>
{% endblock %}
{% block workarea %}
      <form method="get" class="form form-inline">
        小区名称：{% zui_field form.name layout='inline' %}
        <button class="btn btn-default "><i class="icon-search"></i> 搜索</button>
        <a class="btn btn-default pull-right" href="{% url 'rh_create' %}">发布租房</a>
    </form>
    <br/>
    <table class="table">
        <thead>
        <tr>
            <th>小区名称</th>
            <th>大小</th>
            <th>装修</th>
            <th>租金</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for item in object_list %}
            <tr>
                <td>{{ item.name }}</td>
                <td>{{ item.size }}</td>
                <td>{{ item.decorate }}</td>
                <td>{{ item.rent_money}}</td>
                <td>
                    <a href="{% url 'rh_update' pk=item.id %}" data-toggle="tooltip" title="修改"><i
                            class="icon icon-edit"></i></a>
                    <a href="{% url 'rh_delete' pk=item.id %}" data-toggle="tooltip" title="删除"><i
                            class="icon icon-trash"></i></a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    {% if page_obj.has_other_pages %}
        {% zui_pagination page_obj %}
    {% endif %}
{% endblock %}
